1. Field of the Invention
The present invention relates to storage subsystem target devices and, more specifically, relates to methods and associated structure for managing multiple command contexts within a target device by automatically switching between commands.
2. Discussion of Related Art
A storage subsystem includes one or more storage devices for the persistent storage of information. The information and structure relating to the information storage is typically provided to the storage devices by a host computer system (or other storage management device) through an I/O adapter. As used herein, initiator device refers to the host computer system and/or its associated I/O adapter. The target device, as used herein, refers to a selected one of the storage devices to which the initiator device directs an I/O request. The bus over which the initiator and target device communicate is referred to herein as the host channel.
The initiator/target device terminology is common to a standard bus known as Small Computer System Interface (hereinafter SCSI)--a popular electronic bus used to interconnect computers and peripheral devices. However, the problems known in the prior art discussed herein below and the solutions provided thereto by the present invention are common to any of several well known host channel media and architectures, including but not limited to: Fibre Channel, SSA, IPI, IDE, EIDE, and others. For simplicity, the problems and solutions thereto addressed by the present invention are presented herein in the context of a SCSI host channel connection. However, one of ordinary skill in the art will readily recognize that the problems and solutions addressed herein are applicable to other host channel environments.
The SCSI bus has become a common choice for connecting computing devices (through a SCSI adapter in the computer system) to storage peripheral devices such as disk drives, tape drives, disk arrays, and other storage and peripheral I/O devices. The specifications for the SCSI standards for the bus and the information exchanged thereon are publicly available in several forms including the ANSI publication SCSI 2 Standards Document X3T9.2/375R revision 10L. Under the SCSI specifications, each device attached to the SCSI bus has a unique ID value by which it is identified on the SCSI bus. An initiator device initiates an I/O request to an identified target device and transfers any required data by asserting control over the SCSI bus (if available) and directing one or more commands to the identified target device. In general, the target device performs the requested operation and returns information. The returned information may comprise simple sense or status information, or may comprise, for example, data retrieved from a mass storage peripheral device.
A disk drive stores and retrieves data via control circuits and methods (an embedded controller) which command the head disk assembly (HDA) to perform the required physical storage and retrieval of information on the magnetic or optical medium. The interface within the controller to the HDA is referred to herein as the disk channel or formatter. Typically the data transfer bandwidth across the host channel is significantly greater than the bandwidth on the disk channel.
A significant portion of the bandwidth of the host channel may be idle while the disk drive (or other SCSI peripheral device) attempts to process the I/O request via interaction with the actuator through the slower disk channel. Standard SCSI disconnect and reconnect protocols will permit other devices to utilize the SCSI bus during this period. If no other initiator/target connection is established, the host channel will remain idle while the disconnected target device processes the received requests. Rather, the initiator simply awaits completion of the initiated plurality of commands (when the target re-selects the initiator).
Though the target device is incapable of responding to the first initiated command sequence, typical target devices also fail to respond to other commands which could be processed without requiring use of the busy disk channel. In other words, present target devices process received commands serially rather than a plurality of commands concurrently. Target devices, in accordance with the SCSI standards, are often therefore referred to as single-threaded in the sense that they enforce a restriction that only a single command (a single thread) can be processed at a given time. This single-threaded architecture may therefore tend to underutilize the high speed host channel and thereby extend the latency of other queued commands.